package com.freejava.testactivemq.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class MyQueueConsumer {

    // 点对点模式的消费者
    @JmsListener(destination = "${spring.activemq.queue-name}", containerFactory = "queueListener")
    public void getMessageFromActiveQueue(String message) {
        System.out.println("queue接收到的消息是" + message);
    }
}
